learn how to find the total distance